package com.kid.keep.config;

import com.kid.keep.dao.item.CheckItemStandardRepository;
import com.kid.keep.pattern.ReportGradeHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * @Description Bean init
 * @Author DELL
 * @Create 2019-04-16
 * @Since 1.0.0
 */
@Configuration
@Slf4j
public class BeanInitConfig {




    /**
     * ReportGradeHandler
     *
     * @return
     */
    @Bean
    @ConditionalOnBean(value = CheckItemStandardRepository.class)
    public ReportGradeHandler reportGradeHandler(CheckItemStandardRepository checkItemStandardRepository) {
        return new ReportGradeHandler(checkItemStandardRepository);
    }

}
